import request from '@/utils/request'

// 根据样本类型统计
export function chartByType(sampState) {
  return request({
    url: '/statistics/chartByType/' + sampState,
    method: 'get'
  })
}

// 根据样本源类型统计
export function chartBySourceType(sampState) {
  return request({
    url: '/statistics/chartBySourceType/' + sampState,
    method: 'get'
  })
}

// 根据样本组统计
export function chartByGroup(sampState) {
  return request({
    url: '/statistics/chartByGroup/' + sampState,
    method: 'get'
  })
}

// 根据创建人统计
export function chartByCreator(sampState) {
  return request({
    url: '/statistics/chartByCreator/' + sampState,
    method: 'get'
  })
}

// 根据采样时间统计
export function chartBySamplingTime(query) {
  return request({
    url: '/statistics/chartBySamplingTime',
    method: 'get',
    params: query
  })
}

// 根据出入库时间统计
export function chartByStockTime(query) {
  return request({
    url: '/statistics/chartByStockTime',
    method: 'get',
    params: query
  })
}

// 过期样本统计
export function chartByExpired() {
  return request({
    url: '/statistics/chartByExpired',
    method: 'get'
  })
}

// 根据样本类型统计报表
export function reportBySampType(query) {
  return request({
    url: '/statistics/reportBySampType',
    method: 'get',
    params: query
  })
}

// 根据样本源类型统计报表
export function reportBySourceType(query) {
  return request({
    url: '/statistics/reportBySourceType',
    method: 'get',
    params: query
  })
}

// 根据样本组统计报表
export function reportBySampGroup(query) {
  return request({
    url: '/statistics/reportBySampGroup',
    method: 'get',
    params: query
  })
}

// 根据样本类型统计
export function statisticByType() {
  return request({
    url: '/statistics/statisticByType',
    method: 'get'
  })
}

// 统计各容器样本数量
export function statisticContainer() {
  return request({
    url: '/statistics/statisticContainer',
    method: 'get'
  })
}

// 根据样本源类型统计样本
export function statisticSource() {
  return request({
    url: '/statistics/statisticSource',
    method: 'get'
  })
}

// 统计样本总数
export function statisticSampleCount() {
  return request({
    url: '/statistics/statisticSampleCount',
    method: 'get'
  })
}

// 统计样本源总数
export function statisticSourceCount() {
  return request({
    url: '/statistics/statisticSourceCount',
    method: 'get'
  })
}
